#include<cstdio>
#include<cstring>
using namespace std;
const int MAXN = 10005;
const int MOD = 1e5+7;
int a[MOD], cntName = 0;
char name[MAXN][25];

unsigned int hasha(char *url, int mod){
	unsigned int n = 0;
	char *b = (char *) &n;
	for (int i = 0; url[i]; ++i) b[i % 4] ^= url[i];
	return n % mod;
}

int main(){
	int N;
	char s[25];
	scanf("%d", &N);
	for(int i=0;i<N;i++){
		scanf("%s", s);
		strcpy(name[cntName], s);
		cntName++;
		a[hasha(s, MOD)]++;
	}
	for(int i=0;i<N-1;i++){
		scanf("%s", s);
		a[hasha(s, MOD)]--;
	}
	for(unsigned i=0;i<MOD;i++){
		if(a[i]==1){
			for(int j=0;j<MAXN;j++){
				if(hasha(name[j], MOD)==i){
					printf("%s\n", name[j]);
					break;
				}
			}
			break;
		}
	}
	return 0;
}
